@echo off
rem ===========================================================================
rem RHQ Remote Client LDAP Example Startup Script
rem
rem The following variables must be set
rem
rem RHQ_CLIENT_HOME The home directory of the RHQ Client Installation. The
rem RHQ Client can be downloaded from the RHQ GUI under
rem the Administration->Downloads menu.
rem ===========================================================================
rem ----------------------------------------------------------------------
rem Set Environment Variables
rem ----------------------------------------------------------------------
set RHQ_CLIENT_HOME=*MUST BE SET*
rem ----------------------------------------------------------------------
rem Prepare the classpath
rem Add all jar files supplied by the RHQ remote client install
rem ----------------------------------------------------------------------
set CLASSPATH=.
call :append_classpath "%RHQ_CLIENT_HOME%\conf"
for /R "%RHQ_CLIENT_HOME%\lib" %%G in ("*.jar") do (
call :append_classpath "%%G"
)
rem ----------------------------------------------------------------------
rem Prepare the VM command line options to be passed in
rem ----------------------------------------------------------------------
if not defined RHQ_CLIENT_JAVA_OPTS (
set RHQ_CLIENT_JAVA_OPTS=-Xms64m -Xmx128m -Djava.net.preferIPv4Stack=true
)
rem ----------------------------------------------------------------------
rem Uncomment For debugging on port 9999
rem ----------------------------------------------------------------------
rem set RHQ_CLIENT_ADDITIONAL_JAVA_OPTS=-agentlib:jdwp=transport=dt_socket,address=9999,server=y,suspend=y
rem ----------------------------------------------------------------------
rem Execute the VM which starts the CLIENT
rem ----------------------------------------------------------------------
set CMD="%JAVA_HOME%\bin\java.exe" %RHQ_CLIENT_JAVA_OPTS% %RHQ_CLIENT_ADDITIONAL_JAVA_OPTS% -cp "%CLASSPATH%" org.rhq.sample.client.java.ldap.SampleLdapClientMain %RHQ_CLIENT_CMDLINE_OPTS% %*
cmd.exe /S /C "%CMD%"
goto :done
rem ----------------------------------------------------------------------
rem CALL subroutine that appends the first argument to CLASSPATH
rem ----------------------------------------------------------------------
:append_classpath
set _entry=%1
if not defined CLASSPATH (
set CLASSPATH=%_entry:"=%
) else (
set CLASSPATH=%CLASSPATH%;%_entry:"=%
)
goto :eof
rem ----------------------------------------------------------------------
rem CALL subroutine that exits this script normally
rem ----------------------------------------------------------------------
:done
endlocal
exit /B 0